@import './base.less';

.@{css-prefix} {
  &.button {
    display: inline-block;
    border-radius: @border-radius;
    line-height: 1em;
    min-height: 1em;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    font-size: @base-font-size;
    font-weight: 700;
    padding: @button-padding;
    color: rgba(0,0,0,.6);
    background: #E0E1E2;
    text-decoration: none;
    font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
    //box-shadow: 0px 1px 2px -1px rgba(255,255,255,0.5) inset, 0px -2px 0px 0px rgba(0,0,0,0.1) inset;
    //box-shadow: 0 0 0 0 rgba(0,0,0,.5) inset;
    outline: none;
    vertical-align: baseline;
    zoom: 1;
    .user-select(none);
    .transition(all 0.1s linear);

    &.active, &:hover {
      background-color: #C0C1C2;
      color: rgba(0,0,0,.8);
    }

    // type
    &.basic {
      .type-basic;
    }

    &.positive {
      .type-positive;
    }

    &.negative {
      .type-negative;
    }

    &.primary {
      .type-primary;
    }

    // size
    .font-sizes;

    // shape
    &.circle {
      border-radius: 10em;
    }

    .disabled;

    &.loading {
      position: relative;
      .loading(1.2em);
      color: transparent!important;
      &:after {
        border-color: #FFFFFF transparent transparent;
      }
    }

  }

  &.buttons {
    display: inline-flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    vertical-align: baseline;
    //margin: 0 .25em 0 0;
    margin: 0;

    .button {
      border-radius: 0;
      font-size: inherit;
    }
    .button:first-child {
      border-top-left-radius: 2px;
      border-bottom-left-radius: 2px;
    }
    .button:last-child {
      border-top-right-radius: 2px;
      border-bottom-right-radius: 2px;
    }

    // type
    &.basic {
      .button {
        .type-basic;
      }
    }

    &.positive {
      .button {
        .type-positive;
      }
    }

    &.negative {
      .button {
        .type-negative;
      }
    }

    &.primary {
      .button {
        .type-primary;
      }
    }

    // size
    .font-sizes;

  }
}

@-webkit-keyframes button-spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes button-spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

